#pragma once

#include <map>
#include "IComponent.h"
#include "HashedString.h"
#include "Subject.h"

class StatusComponent : public IComponent
{
public:
	typedef Subject<int> Status;
	typedef std::map<HashedString, Subject<int>> StatusMap_t;
	typedef std::pair<HashedString, Subject<int>> StatusPair_t;

	static const HashedString type;
	
	StatusComponent( Entity* parent );
	virtual ~StatusComponent() {};

	const HashedString& Type();
	std::string ToString() const;
	bool ToXML( tinyxml2::XMLPrinter& printer );

	Status& getStatus( HashedString name );
protected:
	StatusMap_t m_stats;
};